package com.hermes.biz.service.user.impl;


import org.apache.log4j.Logger;

import com.hermes.biz.common.model.result.UserResultDO;
import com.hermes.biz.common.model.user.UserDO;
import com.hermes.biz.manager.user.UserOperateManager;
import com.hermes.biz.service.user.UserService;


public class UserServiceImpl implements UserService{

	private Logger log = Logger.getLogger(UserServiceImpl.class);
	private UserOperateManager userOperateManager;


	public UserResultDO getUserInfoByUserId(long userId) {
		
		return this.userOperateManager.getSingleUserByUserId(userId);
	}

	public String toTestString() {
		
		return "ok";
	}

	public void setUserOperateManager(UserOperateManager userOperateManager) {
		this.userOperateManager = userOperateManager;
	}

	public UserResultDO getUserInfoByUserName(String userName) {
		UserResultDO userResultDO = this.userOperateManager.getSingleUserByUserName(userName);  
		return userResultDO;
	}

	public boolean registerNewUserAccount(UserDO userDO) {

		return this.userOperateManager.insertNewUser(userDO);
		
	}

	public UserResultDO getUserInfoByOpenIdSina(String OpenId) {
		// TODO Auto-generated method stub
		return null;
	}

}